package com.jyw.business.ins.domain.dto.wechat;

import com.jyw.business.ins.domain.InsTask;
import com.jyw.business.ins.domain.InsTaskRectify;
import com.jyw.business.ins.domain.dto.web.BaseInsTaskEditDto;
import com.jyw.business.obstacles.domain.dto.web.BaseOrderAddDto;
import com.jyw.business.obstacles.domain.dto.wechat.WechatOrderAddDto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
 * @author Created by ZhangCheng on 2023/10/09 (修改巡检任务请求实体)
 */
@Data
@ApiModel("小程序-修改巡检任务请求实体")
public class WechatInsTaskEditDto extends BaseInsTaskEditDto {
    @ApiModelProperty("巡检结果录音")
    private String inspectionSound;

    @ApiModelProperty("限期整改录音")
    private String soundFile;

    /**
     * 转工单
     */
    @ApiModelProperty("工单信息（转工单）")
    private WechatOrderAddDto orderAddDto;

    @Override
    public InsTaskRectify buildRectify() {
        InsTaskRectify rectify = super.buildRectify();
        rectify.setSoundFile(getSoundFile());
        return rectify;
    }

    @Override
    public InsTask buildTask() {
        InsTask task = super.buildTask();
        task.setInspectionSound(inspectionSound);
        return task;
    }
}
